package org.oslims.client;

import org.oslims.client.presenter.AnalysisPlaningPresenter;
import org.oslims.client.presenter.AnalysisPresenter;
import org.oslims.client.presenter.CustomerPresenter;
import org.oslims.client.presenter.DepartmentPresenter;
import org.oslims.client.presenter.EnterResultsPresenter;
import org.oslims.client.presenter.ErrorPresenter;
import org.oslims.client.presenter.LabManagerPresenter;
import org.oslims.client.presenter.LabResponsiblePresenter;
import org.oslims.client.presenter.MixturePresenter;
import org.oslims.client.presenter.OperatorPresenter;
import org.oslims.client.presenter.ParameterPresenter;
import org.oslims.client.presenter.RequestPresenter;
import org.oslims.client.presenter.RootPresenter;
import org.oslims.client.presenter.SamplePresenter;
import org.oslims.client.presenter.SampleRootPresenter;
import org.oslims.client.presenter.SampleTypePresenter;
import org.oslims.client.presenter.ShowResultsPresenter;
import org.oslims.client.presenter.UploadPresenter;
import org.oslims.client.presenter.UserPresenter;
import org.oslims.client.presenter.ValidateResultsPresenter;
import org.oslims.client.view.impl.RootViewImpl;
import org.oslims.domain.Request;

import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.TabPanel;
import com.mvp4g.client.annotation.Event;
import com.mvp4g.client.annotation.Events;
import com.mvp4g.client.annotation.Start;
import com.mvp4g.client.event.EventBus;

@Events(startView = RootViewImpl.class)
public interface MainEventBus extends EventBus {

	@Event(handlers = CustomerPresenter.class)
	public void inizializeCustomerManagement(TabPanel tp);

	@Event(handlers = LabManagerPresenter.class)
	public void inizializeLabManagerManagement(TabPanel tp);

	@Event(handlers = LabResponsiblePresenter.class)
	public void inizializeLabResponsibleManagement(TabPanel tp);

	@Event(handlers = OperatorPresenter.class)
	public void inizializeOperatorManagement(TabPanel tp);

	@Event(handlers = ErrorPresenter.class)
	public void error(String message);

	@Event(handlers = UserPresenter.class)
	public void showUserManagement(DockLayoutPanel mainWidget);

	@Event(handlers = DepartmentPresenter.class)
	public void showDepartmentManagement(DockLayoutPanel mainWidget);

	@Event(handlers = ParameterPresenter.class)
	public void showParameterManagement(DockLayoutPanel mainWidget);

	@Event(handlers = AnalysisPresenter.class)
	public void showAnalysisManagement(DockLayoutPanel mainWidget);

	@Event(handlers = SampleTypePresenter.class)
	public void showSampleTypeManagement(DockLayoutPanel mainWidget);

	@Event(handlers = RequestPresenter.class)
	public void showRequestManagement(DockLayoutPanel mainWidget);

	@Event(handlers = SampleRootPresenter.class)
	public void showRootSampleManagement(DockLayoutPanel mainWidget);

	@Event(handlers = SampleRootPresenter.class)
	public void showRootSampleManagementByRequest(DockLayoutPanel mainWidget, String requestCode);

	@Event(handlers = AnalysisPlaningPresenter.class)
	public void showAnalysisPlaning(DockLayoutPanel mainWidget);

	@Event(handlers = EnterResultsPresenter.class)
	public void showEnterResultsByAnalysis(DockLayoutPanel mainWidget);

	@Event(handlers = ValidateResultsPresenter.class)
	public void showLabValidateResults(DockLayoutPanel mainWidget);

	@Event(handlers = ValidateResultsPresenter.class)
	public void showScientValidateResults(DockLayoutPanel mainWidget);

	@Event(handlers = ShowResultsPresenter.class)
	public void showResults(DockLayoutPanel mainWidget);

	@Event(handlers = UploadPresenter.class)
	public void showUpload(DockLayoutPanel mainWidget);

	@Event(handlers = SamplePresenter.class)
	public void inizializeSampleManagement(TabPanel tp);

	@Event(handlers = SamplePresenter.class)
	public void refreshSampleView(Request currentRequest);

	@Event(handlers = MixturePresenter.class)
	public void inizializeMixtureManagement(TabPanel tp);

	@Event(handlers = MixturePresenter.class)
	public void refreshMixtureView(Request currentRequest);

	@Start
	@Event(handlers = RootPresenter.class)
	public void start();
}
